package com.csq.common.pojo;

import java.io.Serializable;

public class ReturnResult implements Serializable{

	private int state;
	private String message;
	private Object object;
	
	
	

	public ReturnResult() {
		super();
	}

	public ReturnResult(int state, String message, Object object) {
		super();
		this.state = state;
		this.message = message;
		this.object = object;
	}

	public ReturnResult(int state, String message) {
		super();
		this.setState(state);
		this.setMessage(message);
	}

	public ReturnResult(int state) {
		super();
		this.setState(state);
	}

	public static ReturnResult build(int state, String message) {
		return new ReturnResult(state, message);
	}

	public static ReturnResult ok() {
		return new ReturnResult(StatusCode.SUCCESS);
	}

	public int getState() {
		return state;
	}

	public void setState(int state) {
		this.state = state;
	}

	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}

	public Object getObject() {
		return object;
	}

	public void setObject(Object object) {
		this.object = object;
	}

	@Override
	public String toString() {
		return "ReturnResult [state=" + state + ", message=" + message
				+ ", object=" + object + "]";
	}
	
	
}
